# -!- coding: utf-8 -!-
# @FileName  :utils.py
# @Time      :2020/10/25 14:59
# @Author    :zhoujirong

from common.http_request import Request
from biz.support.urls import ServerUrl

class EntAsynCheckRequest:
    @classmethod
    def ent_receive_task_getpage(cls,curPage,
                                    maxSize,
                                     search_EQ_signCode,
                                     search_EQ_uniformSocialCredCode,
                                     search_EQ_orgInstCode,
                                    search_EQ_enterpriseName,
                                    search_EQ_qryReason,
                                    search_EQ_status,
                                    search_EQ_operator,
                                    search_EQ_operOrg,
                                    search_GTE_LTE_operTime_DATE_RANGE,
                                    search_EQ_operOrgRange,
                                    search_EQ_queryFormat,cookie):
        data = {
            'curPage':curPage,
            'maxSize':maxSize,
            'search_EQ_enterpriseName':search_EQ_enterpriseName,
            'search_EQ_orgInstCode':search_EQ_orgInstCode,
            'search_EQ_uniformSocialCredCode':search_EQ_uniformSocialCredCode,
            'search_EQ_signCode':search_EQ_signCode,
            'search_EQ_qryReason':search_EQ_qryReason,
            'search_EQ_status':search_EQ_status,
            'search_EQ_operator':search_EQ_operator,
            'search_EQ_operOrg':search_EQ_operOrg,
            'search_GTE_LTE_operTime_DATE_RANGE':search_GTE_LTE_operTime_DATE_RANGE,
            'search_EQ_operOrgRange':search_EQ_operOrgRange,
            'search_EQ_queryFormat':search_EQ_queryFormat
        }
        req = Request(ServerUrl.ent_receive_task_getpage_url,params=data,headers=cookie)
        return req.get()

    @classmethod
    def ent_checkinfo_receivetask(cls,ids,cookie):
        data = {
            'ids':ids
        }
        req = Request(ServerUrl.ent_receive_task_url,data=data,headers=cookie)
        return req.post()


    @classmethod
    def get_page(cls,curPage,maxSize,
                        search_EQ_enterpriseName,
                        search_EQ_orgInstCode,
                        search_EQ_queryFormat,
                        search_EQ_signCode,
                        search_EQ_uniformSocialCredCode,
                        search_EQ_qryReason,
                        search_EQ_status,
                        search_EQ_operator,
                        search_EQ_operOrg,
                        search_GTE_LTE_operTime_DATE_RANGE,
                        search_EQ_archiveViewStatus,
                        cookie):
        data = {
            'curPage':curPage,
            'maxSize':maxSize,
            'search_EQ_enterpriseName':search_EQ_enterpriseName,
            'search_EQ_orgInstCode':search_EQ_orgInstCode,
            'search_EQ_queryFormat':search_EQ_queryFormat,
            'search_EQ_signCode':search_EQ_signCode,
            'search_EQ_uniformSocialCredCode':search_EQ_uniformSocialCredCode,
            'search_EQ_qryReason':search_EQ_qryReason,
            'search_EQ_status':search_EQ_status,
            'search_EQ_operator':search_EQ_operator,
            'search_EQ_operOrg':search_EQ_operOrg,
            'search_GTE_LTE_operTime_DATE_RANGE':search_GTE_LTE_operTime_DATE_RANGE,
            'search_EQ_archiveViewStatus':search_EQ_archiveViewStatus
        }
        req = Request(ServerUrl.ent_asyn_getpage_url,params=data,headers=cookie)
        return req.get()

    @classmethod
    def ent_select_archive(cls,id,cookie):
        data = {
            'id':id
        }
        req = Request(ServerUrl.ent_select_archive_url,data=data,headers=cookie)
        return req.post()

    @classmethod
    def ent_pass(cls,archiveType,enterpriseName,creatTime,creator,dsRegiNo,frgCorpNo,gsRegiNo,
                    expireDate,ext1,ext2,ext3,ext4,ext5,ext6,extendDate,id,note,orgCreditCode,
                    operTime,operationIdentifier,operator,operOrg,ownOrg,quantity,orgInstCode,
                    queryNum,remarks,reqId,resCode,resMsg,serialNumber,startDate,regiTypeCode,
                    signCode,uniformSocialCredCode,status,ids,cookie):
        data = {
            'archiveType':archiveType,
            'enterpriseName':enterpriseName,
            'creatTime':creatTime,
            'dsRegiNo':dsRegiNo,
            'creator':creator,
            'frgCorpNo':frgCorpNo,
            'gsRegiNo':gsRegiNo,
            'orgCreditCode':orgCreditCode,
            'orgInstCode':orgInstCode,
            'regiTypeCode':regiTypeCode,
            'signCode':signCode,
            'uniformSocialCredCode':uniformSocialCredCode,
            'expireDate':expireDate,
            'ext1':ext1, 'ext2':ext2,
            'ext3':ext3, 'ext4':ext4,
            'ext5':ext5, 'ext6':ext6,
            'extendDate':extendDate,
            'id':id,
            'note':note,
            'operTime':operTime,
            'operationIdentifier':operationIdentifier,
            'operator':operator,
            'operOrg':operOrg,
            'ownOrg':ownOrg,
            'quantity':quantity,
            'queryNum':queryNum,
            'remarks':remarks,
            'reqId':reqId,
            'resCode':resCode,
            'resMsg':resMsg,
            'serialNumber':serialNumber,
            'startDate':startDate,
            'status':status,
            'ids':ids
        }


        req = Request(ServerUrl.ent_check_pass_url,data=data,headers=cookie)
        return req.post()

    @classmethod
    def ent_check_pass(cls,id,cookie):
        data = {
            'id':id
        }
        req = Request(ServerUrl.ent_check_pass_url,data=data,headers=cookie)
        return req

    @classmethod
    def ent_check_refuse(cls,id,refuseReasons,cookie):
        data = {
            'id':id,
            'refuseReasons':refuseReasons
        }
        req = Request(ServerUrl.ent_check_refusal_url,data=data,headers=cookie)
        return req.post()

    @classmethod
    def ent_check_back(cls,archiveId,
                    archiveViewStatus,
                    assocbsnssData,
                    checkinfoId,clientIp,
                    enterpriseName,creditUser,
                    ext1,ext2,ext3,
                    ext4,ext5,ext6,
                    id,note,operOrg,
                    operTime,operator,
                    president,qryReason,
                    queryFormat,queryTime,
                    queryType,reason,uniformSocialCredCode,
                    refuseReasons,rekOrg,
                    rekTime,rekType,signCode,
                    rekUser,remarks,regiTypeCode,
                    reqId,resCode,orgInstCode,
                    resMsg,resultStatus,orgCreditCode,
                    resultType,serialNumber,gsRegiNo,
                    source,status,dsRegiNo,frgCorpNo,
                       cookie):

        data = {
                    'archiveId':archiveId,
                    'regiTypeCode':regiTypeCode,
                    'orgInstCode':orgInstCode,
                    'orgCreditCode':orgCreditCode,
                    'gsRegiNo':gsRegiNo,
                    'dsRegiNo':dsRegiNo,
                    'frgCorpNo':frgCorpNo,
                    'archiveViewStatus':archiveViewStatus,
                    'assocbsnssData':assocbsnssData,
                    'uniformSocialCredCode':uniformSocialCredCode,
                    'signCode':signCode,
                    'checkinfoId':checkinfoId,
                    'clientIp':clientIp,
                    'enterpriseName':enterpriseName,
                    'creditUser':creditUser,
                    'ext1':ext1,
                    'ext2':ext2,
                    'ext3':ext3,
                    'ext4':ext4,
                    'ext5':ext5,
                    'ext6':ext6,
                    'id':id,
                    'note':note,
                    'operOrg':operOrg,
                    'operTime':operTime,
                    'operator':operator,
                    'president':president,
                    'qryReason':qryReason,
                    'queryFormat':queryFormat,
                    'queryTime':queryTime,
                    'queryType':queryType,
                    'reason':reason,
                    'refuseReasons':refuseReasons,
                    'rekOrg':rekOrg,
                    'rekTime':rekTime,
                    'rekType':rekType,
                    'rekUser':rekUser,
                    'remarks':remarks,
                    'reqId':reqId,
                    'resCode':resCode,
                    'resMsg':resMsg,
                    'resultStatus':resultStatus,
                    'resultType':resultType,
                    'serialNumber':serialNumber,
                    'source':source,
                    'status':status
        }
        req = Request(ServerUrl.ent_back_task_url,data=data,headers=cookie)
        return req.post()





if __name__ == "__main__":
    pass